package itdep.domain;

import ga.domain.AbstractEntity;
import ga.domain.GenericEntity;
import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;

/**
 * @author Ivan Khalopik
 * @version $Revision: 52 $ $Date: 2010-07-06 10:22:21 +0000 (Tue, 06 Jul 2010) $
 */
@MappedSuperclass
@org.hibernate.annotations.Entity(dynamicInsert = true, dynamicUpdate = true)
public class IisEntity extends AbstractEntity<Long> implements GenericEntity {
	public static final IisEntity ANY = new IisEntity(-1l);

	@Id
	@GeneratedValue(generator = "common")
	@GenericGenerator(name = "common", strategy = "increment")
	@Column(name = "ID", unique = true)
	protected Long id;

	@Version
	@Column(name = "VERSION")
	private Integer version;

	protected IisEntity() {
	}

	protected IisEntity(Long id) {
		this.id = id;
	}


	public Long getId() {
		return id;
	}
}